Search template and little fixes