made changes recommended by Code Climate