Moved javascript out of html