Changed directoy structure and switche to cmake