Fixed various type and syntax errors
Added filter and scan in parser