DATAGRAPH-388 : Continued work - Refactoring and cleanup