Fix codeclimate issues