Refactored called to CodeGenerator constructor.

Includes use of CodeGenerator class. Use of namespace in class constructor called was deleted.