Codeclimate fixes