Clean up ast.rb a bit, fix dumb bugs.