Generic implementation of maybe parser.
Removed unnecessary namespace