Moved inline javascript out