code climate integration

+ code cleanup and quality improvements