Minor improvements and sanitization