Implementing code comments suggested.