Switch to using context managers for locking.
Call init for the Proto
Add asserts for integer handling of the escape functions.
Add some basic network side tests.