big update and cleanup