Modified position of trim function
Added help flag