Elements-data

Code cleanup and inline documentation.