Changed member functions to const and added boolean operator.