Added changes based on comments on last commits.