add refactoring comment to motion.js