data persistence, refactor motion tracker