Various changes + lots of commenting