Added config files or CMake

Also some bugs in recompression are fixed. And some fixes to make VS work with Debug runtime.