Starting to take shape now. What a mess of refs to fix though.