Completed XML doc comments, fixed a couple of bugs