Minor fixes, tests, etc.