Add removeTrailingLineBreaks and implement it in getValue.trim