Completed the initial class definition for BaseElement.

Corrected instantiations of Exception to \Exception (root namespace).

The test scratchpad now has new code reflecting the changes to BaseElement.