Adding enquiry GUID and some refactoring