Add more performant Match method, tidy up code, re-add Some and None classes for pattern matching purposes elsewhere.