Moved a lot of the AST in lager_transform into a function to make things easier to read and modify

Additional changes and formatting by Andrew Thompson
2 files changed