Refactored promises to be slightly more asynchronous
Modified photo.js so that it uses caching for retrieving users.