Fixes issues #21 and #25

Removed `config.js` and directory can now be configured in the settings dialog.
Other stuff is just refactoring and not using old APIs.