Finally fixed up EnderCommandRepair and neatened up the code