Order msgs by timestamp + remove legacy code