Refactoring for consistency; fix relative errors.