added lambda expressions
added comments and fixed bugs in type parsing