refactoring server-side code to prepare for authentication and persistence
breaking out some front-end calls