Refactored some controlles