Fixed bugs and made it W3C-validate

Enjoy!

More...