some tidy up + repackaging + rollback