First set of changes. Modified mean example to work with solve function.