New batch of fixes, tests and docs
updated TODO