Debug panel can now toggle it's state live - via the settings panel - and some code refactoring as well. Resolves issue #9