General cleaning, new js structure