Fix many XSS injection problems²
Remove commented out code
Fixed problems when saving custom attributes