cleaning up for a rewrite, made bad design choices that need change