it's amazing this thing works for how broken it is.  REFACTOR ALL THE THING