Consolidated code and documentation

Consolidated code structure, updated and added code documentation to allow generating a proper documentation using JSDuck.
I'm afraid this is a bit messed up. Let's see: Parameter 1 is optional, 2 is required, 3 and 4 are optional. If 1 is left out, 2-3-4 becomes 1-2-3. But if 3 is left out 4 does not become 3. Ouch.

Conclusion: `nameOrBase, baseOrConstructor, constructorOrMembers, members`.