more const's, and improved lookup