Fixed some codeclimate issues.