Clean up some validations and logging