Rewrite some functions in terms of maybe.

This isn't more efficient, probably less efficient. But shows
the relationship between maybe and other functions.