Added maybeToList to identify how to flatten a list. The rest of the commits are related to the State Monad