Well whadya know, I woke up this morning and decided to refactor it