Refactored
Added controller method tests