Reimplementation of most NSObject functionality, for educational purposes