added namespaces and splitted classes in two differents files