added notebook for flatness code and started incorporating adaptive windows to c++