more work on peggy

Updated to work with the latest grammar file, which changed how the data
is returned.
Got math in place.