Various improvements and bugfixes, suggested code to scan for CSS problems