Fixes, tests, etc