up middlewarify
create entity test and fix bug found
adding more entity tests...