Some fixes to distribute through pypi