Moved js to jsfile