Refactored app to conform to some universal patters