Added type application as an extension, new testcases, error msg fixes