Changed response codes for when server validation fails. Refactored server-side model generation. Implemented some user-side model generation.