Add new hash and remove a line.