Removed some legacy files

Now it can compile again. I also changed the CMakeLists file adding an
option for building the samples or not.