removed extra mutex checks and some old unused code