Simplify documentcontroller logic

Don't hardcode the kdev scheme, just don't check if the document exists if
it's in an unknown protocol.
Also follow the else if pattern where possible