Bug fixes and HTML improvements