Validation clean up, add support for saving defintions from memory