Added extra comments and various cleanup