Minor fixes and cleanups, ready for first bench tests