Refactor fifo_fwft