improved sanitization, other small changes