Refactored called to CodeGenerator constructor.

Includes use of CodeGenerator class. Use of namespace in class constructor called was deleted.
Merge pull request #2 from mectwork/patch-2

Fixed use of class CodeGenerator in tests (fix #1)