Final Changes to make it work.

The code is finished and tested on a real web server and then minor
fixes applied.