Better unicode support, general cleanup
More small cleanup