finally ran this through a linter and spotting bad code via codeclimate... whoops. bunch of little updates