changes to data structure

reformatting the data structure and rationalising the creation of the
elements