Add support for read-only bind optimizations and fix up some optimizations
Switch to pep8 4-space shifts