Refactored how data is stored on server