error reporting + some XSS + removal of unnecessary bits