code cleanup, added some comments, more to do