PEP-compliant string formatting, sanity checks, additions to shmmy module