Python: removed dead code
Various cleanups found during sync with python
Sync python with the js new sweetness

Closes #185