Compute on scalar expressions

closes #474
Just a style nit, I would usually represent associative data like this as a dict.