Removed code duplication for setting up window and rootviewcontroller
Merge pull request #1 from steffex/master

Removed code duplication for setting up window and rootviewcontroller