Refactoring within controller and factory desktop directory

http://fitstats-staging1.azurewebsites.net/