Feature/first pass atn

Here are the changes that Alejandro mentioned in his email.