Fixed const functions

So const before a function is not the same as const after a function
declaration. They've all been changed