Refactors RootViewController

A small general refactor on RootViewController. Contains the following:

* Get as close to the 80 char soft limit as possible
* Unify formatting, particularly with functions
* Add sanity check assertions where necessary
* Clean up file headers and add correct license information
* Add notes on deprecated functions, tagging for future removal.