Made member functions and variables const where appropriate