Cleaned the wrap code.
Added test with append on a list.