One thing that strikes me: in your "examples", you consistently forget the terminating semi-colon for your class definitions. Now, this may just be carelessness with your pseudo-examples, but perhaps...