Changed JS structure - still halfway