Add function delete_old_ami and add some comments.