Finished the monadic eval function. Seems buggy though?
Removed the Writer monad and now things work