Made changes based on advice by another programmer.