Move refreshApps and refreshFavs to after instantations they depend on.

Potentially addresses:

https://bugs.launchpad.net/linuxmint/+bug/1081842


Also fixes some whitespace messiness.