Moved js to an external file