Rewrote explore functionality to be cleaner and more extensible.