Added photoset logic; refactored gcmServer; various other changes