Implement escape sequence and added some comments