Library branch

More Library fixes, mostly Py3 stuff