Fix for issue #5 (Cannot set property 'treeViewState' of undefined)
Fix for correctly opening of "always-open" files during initialization
Code refactorings
Minor code refactoring