Initial version, syntax cleanups from jlock.py.

jlock is a internal tummy.com project.