Small bug fixes and comments.
Fixed Merge Conflicts