minor changes after Kevin's review

several changes mainly because switching from JSHint to JSLint. (moved DocumentObserver on top of ProtocolHandler)

some extra minor changes related to @imports (see 689efeb)