restructure kinetics.js