move some js to common.js