Refactored truncate function and moved classes of Truncator to standalone functions