replaced std::list by std::vector and some tiny related stuff