Refactor memo route in server