Minor changes after rebasing on the work Kees and Max did, now it compiles again