Fixed to (mostly) stop pylint complaining