add coercion, tests and bugfixes.
remove now-unused tests.