Code climate refactoring

Refined multiple services and controllers to improve scoring in CC