Various stuffs

functions.cpp and main cpp file renamed, add a drand function, pointers
(a.k.a memory) more safe, still need to check the routines