Minor changes and added doc comments.