Cleanup repository

Move logic to js directory and resources to res directory.
Remove all javascript from index.html and put it into main.js.
Add charset and title.