separated out js from html