Updated to remove debug statements.