Interface improvements. Fixed a few bugs.