cleans up value parser a bit
adds some proximity measures for invalid data