made better use of sets in get outgoing/incoming functions
added more tests
use sorted sets
added more tests, added make clean