Mainly code comments, bug fixes