Factor out usage of Optional in certain places where it no longer made sense.