Clean up modules script and output yaml instead of json