nodetype fixes

Because all .h files need each other, classes need to be forward
declared. Somewhere in that mess, NodeType is not correctly loaded. For
this reason nodetype is now in their own .h and loaded from relevant
files.
mousePressEvent returns

Did not correctly merge Ruud's code into test. No wonder I couldn't find
the working code.