Modified QueryFormatter, added output table