Added some extra comments. Various cleanup