Add prepend and append options
Fix unit tests