added some comments to better find stuff and lots of tiny enhancements