Cleaned up the parsing of an equation