Some simplifications, and unicode support