Fixed the multiple-of-four issue, though the code is now even messier! Yay!