make evaluation of expressions monadic

we need State and IO later, because expressions can have IO and
assignment side effecs
code cleanup
refactor type signatures