Switched construction of BaseClass to am define and CommonJS style
Moved option merging out into a utility and mixed in at BaseClass.