MODE-1680: 
Remove unused commented lines
Add more checks at the parsing stage
MODE-1680: Extend query processor to allow use aliased joinings