Moved JS out to separate file.