Changed to compile with C++

const all the things