Added re-generated code
Fixed various bugs. Added tests for evaluation code