Added untested register code.