Fixed action parsing.
Updated main to work with the new parser.