Basic logging capabilities + some pep8 cleanup