Rework to compile properly