Removed unused macros and added small optimisation to a couple of infinite run loops