Small Improvements

Made some small improvements, such as const correctness.