Type resolving in parser based on using statement structure. Closes #30