Test and other cleanups