Adapt project to new API so it compiles and udpate a few tests too