Made factorial calculator more object oriented.