Improvements

Implemented a preferences panel, other bug fixes and cleanup, as well as added new toolbars.