refactoring code to use $http methods for persisting data as well as set up a structure for an admin side and a user shopping cart