Separate JavaScript and HTML

Closes #4.