Added to_i and to_s methods, and fixed many tests.