Finished Step 8: Refactor web.lua to select/filter/format