More codeclimate fixes