Refactor. Replace some defs with vals.