Updated registration code so it's a little more logical. Minor changes.