File refactoring and updated license.

Splitting main file into separate files. Updated unit tests. Updated copyright to use MIT license. Added new view instantiation logic to look for navigation controller instead of replacing rootViewController.