Better code layout and minor fixes.

The results.js has been fixed to load correctly the results from almost all
the tasks.