re-organize javascript files