add comments/documentation to datamanager.js