Clean up input mirroring & move to anonymous scope