Improved html output and debugged.