Improved documentation.
Formatted code to be more readable.
Made setAsRootView and addChildView chainable.