Added user model and refactored files