Validation and tweaks