Calirifying the mess around javascript for myselft