Some small updates including moving the purification to it's own function and setting the 'entities' option to false.