more code optimization and cleanup