Add comments. Factor out common parts of RemoteDoc & LocalDoc to inherit from Doc.
Forgot semicolon
Inherit LocalDoc and RemoteDoc prototypes from Doc.prototype
More comments