Implemented Randall's suggestions.