Fixed problem with AST; Improvements on semantic analysis