Fixed a couple of issues identified by code-climate.