.appendText()

Added new methods appendText(), isEmpty(), and some refactoring.