Simple object oriented programming errors