Exposed writing and synthesis
merged fixes to python3 support