Updating defines with better validation