Modified final cleanup to clear stdin, for cleaner future commits