Cleaned up some code, added xml summaries

There are more xml summaries to add.