Apply safe async function to middleware.
Refactor handler alias middleware and add rebuild option for input handler specs.