Cleanup with codeclimate

Little bit of refactoring