Took out middleware dedup and added anonymous handler construction similar to defhandler.