Made some changes that fixed the glitches mentioned in the last commit.
also managed to streamline the code so that only "X" is needed for all 3 guards, no order necessary.