Added navigation and started to factor code out

Added Navigation class and attempted to factor out some common code, or
things that do not belong here.