Test fixes and cleanups #302