Improved performance. Changed unordered_map to vector. Unordered map is easier to use but vector provide more performance (same speed is achieved by using boost or std vectors, further testing with big networks is needed to check if still gives the same results).