fixes, cleanup and avg timings