Implement proper closing and main fix.

The loading of templates now works correctly.
It also properly saves the java file upon open
and writes the user content back upon close.

Template switching no longer uses document.reload,
as I found an easier way.
Massive README.md update.

Keeping documentation up to date is hard :(