Refactors the output scheme.