Correct memory leak
Adding namespace and separating classes in files