Moved popup js into its own file.