Remove trailing whitespace
Fix typos

Also changes CALLBACKURL to CALLBACK_URL for consistency
Fixes from PyFlakes issues
Stylistic cleanup from pep8