lots of changes: UI stuff, shape matching stuff, etc.