Fixing up some issues with linting and making the code a bit nicer.