some directory re-organization, DRYing up CMake stuff