(refactor) Minimally better, still ugly