Switched to state monad
Abstracted recursion pattern
Added add and lit