major rewrite of data element handling
Merge pull request #7 from grobertson/prettyfy

major rewrite of data element handling