Added some const specifiers to make the code more C++-ish