Added const to some methods. Closes #186.