Merge Kostas' code

This is the current status of @ktzoumas branch.
I have added some tests and there are some empty ones in `TestGraphOperations.java`. 
Go ahead and pick up from those :)