Rewrote, created with a class, removed the use of regex for HTML