Switched to meach cleaner monadic code to handle failure in solveTree.
Switched from concat map to concatMap.