Moved Controller from API repository to Controller