Code cleanup, slightly better animation syncing