Version 4 and other cleanups