Separate javascript from html