Many changes to put it in working order