Changed implementation to use Map. Modified calculate adjacencies.
Committed old files.