Sync cleanups and generic input dispatch support in Engine