Add murate support and refactor scripts