A little more work toward middleware