Added class constructors and a toString method.