Adds tests for parsing of common XSS attack vectors
Refactors so component methods (read, write type)