Moved js to a separate file.