Javascript cleaned