Moved some stack frame code into its own module.
Moved reusable ast node code into helpers.