Added some structure for the actual calculation of the expressions.