Add some functions and modify appendText etc.