bug fixes, and adding offsetToString() and relatedToString()