Moving classes and functions out of model file into module