Creates sanitize method and tests