begin migration away from patching paradigm; clean up of lots of minor compiler warnings; thal bindings currently print output -- will fix later