Fixed some errors with AST code generation.

- Now supports closure variables
- Fixed problem with lambda functions in function_map
Merge pull request #32 from hunse/master

Fixed some errors with AST code generation.