Some repositories have been added. Some logic has been roplaced from controllers to services.