"register" command, more clean-up