Refactor truncation to a function and add truncated relative flag