Clean up of Javascript