Bug Fixes

This commit finished a more or less functional version. Next I plan to
add popup help and some cleaner layout.