apparently Ximon hates const; a lot;
added a bunch of const everywhere, had to modify a few functions to be const-compliant