Some cleanups, and new version