organizing js a bit
organizing js a bit