Aded creation of :varid and :version attributes for variables, fixes #5