clean up of PHP and removed unneeded console.log =S