Added appendText function.