reset() added
added stack operations, improved utf handling