Added more refined input sanitizer