Fixed integer division problem in community detection algorithm
Tests updated
Standalone testing script updated.