adding AG triple store functionality and refactored code to date. Removing redundant functions