Finally fixed up EnderCommandRepair and neatened up some other code