Moved JS outside html files. Fixes #8