Ported everything else over plus linted + pep8ed.