Cleanup of jasper.py

If cleaned up `jasper.py`.

If have also some questions for futher cleanup.
Not entirely clear to me where this came from. Any ideas, @shbhrsaha?