restructuring this broken-ass project