Fixed the command parser and added the register command