Updated relativeTo methods

Fixed semantic errors, added 4D version