Remove some deprecated files and updated CMakeLists.txt