Messing around with the javascript refferences