Improved text between bdo tag handling, improved IE, improved comments

There have been several changes, improved the RegEx for improved tag cleanup, wrapped numbers in dir=ltr for better IE and FF handling, segmented out some functionality into separate functions.