a lot of progress on gui, and optimizations