Bugfixes & cleanups

These are bugfixes and cleanups. There are definitely still bugs with NotificationService, but those will probably be fixed when I send the persistent-notification branch (which I hope to submit within the next couple of weeks). Move system.exit() -> finish(). Cleanup licenses and license headers with Intellij's awesome settings. Add some useful localhost stuff. Other miscellaneous stuff.