Minor tweaks, added some comments