all the pieces together
cleanup
start of merge fixes