TODO: cleanup. Thsi whole pattern of a boolean and a value that can't be evaluated unless the boolean is true., is ugly and optPattern would be better using option types.
TODO: cleanup. Thsi whole pattern of a boolean and a value that can't be evaluated unless the boolean is true., is ugly and optPattern would be better using option types.