fixed - all errors removed

Work done to core.rb to allow 0 to be returned.
to_s method added, comments corrected