Search UI, cleaned up a lot of code