Refactored functions

arrayMerge, trim, ltrim, rtrim, capitalize, lpad, rpad