Lots of bugfixes and docstring fixes, better transform api