Implemented TypeScript. Replaced UserPreferenceServer.js with .ts version that compiles into the new UserPreferenceServer.js