moved some stuff around; some comments etc.