Move js to proper objects