Experimental version with the concept of Free monads, needs cleanup