Debugging REST requests
Clean up pyflakes and pep8. Fix editor fallback logic.

Closes #9 (for Chris Murphy)
Closes #8