Adding delegate methods, cleaning up codebase and making number of pages a method

The code now is more Cocoa-ish and allows for more functionality.

For example, one could store the view controllers for the views because now the delegate is notified when a view is unloaded (so the controller can be cleaned up).

Mind that this _will_ break code. As it is only version 0.0.1, I did not mind using deprecation and such.