Got rid of deep if/else nesting

I got rid of the deep if/else nesting in application/libs/Application.php

I also updated the tabs to 4-spaces, and as you can see, am now committing to develop instead of master. :)