Didn't commit enough
But refactored and trying to work out mapping
Fixed errors