clean up some duplicate code

Just cleans up some smell from Code Climate