Code cleanup from codeclimate report. Add codeclimate badge.