Added "trim" option. Resolves #13.