Commenting updated

comments updated, code visually tidied up.