Added more debug. Change appen to appenTo and prepend to prependTo.