Few optimizations, and added a foreign character generator