Reorganize Keep code in preparation for dividing into modules.

Refs #2620