C++ and stuff (need feedback for more eficiency)