Refactor restructure-param to return maps