Cleaning up code. Improving comments.