major cleanup throughout