Refactor & cleanup restructure-param, add :middlewares binding