Intermediate update to retain something like a history of dev
Consolidated everything into one datatype that uses refs