Removed old code and clarified comments.