Add tests, refine User model