Code cleanup and added some more doc comments.