#15 Added tests for code generator
#15 Added logger for code generator
#15 Added CPSGeneratorException and completed implementation