moved inline JS to its own file.