code compress & cleanup