Moved javascript to a separate file.