Quick fix and added doc comments.