separated and refactored controllers structure