fixed some codeclimate issues