Removed unused logic and fixed a minor issue with the legacyoutput plugin.