added basic code generation (not fully implemented) for simple lambda.
also fixed various bugs and syntax error.