Fix upgrade, and remove module routines refs #803