Refactoring User schema to use module pattern