Rewriting some of the codes to remove initialization errors in the constructors initializer list. Also moving from raw pointers to shared pointers for the neighbor lists by using the boost::dynamic_pointer_cast<> which will return a shared pointer instead of a raw pointer like the SafePointerDownCast that we normally use.