Changed some code execution logic in main view
Merging from master

Merge remote-tracking branch 'upstream/master'
Integrated and tested (on phone) all the offline functions.  Fixed sync logic
Merge pull request #356 from iameric1986/master

Offline functions should work now.  Syncing logic has been modified.
Merge branch 'master' of https://github.com/CMPUT301F14T03/lotsofcodingkitty