rearranged comments, added todos and comments