Code was refactored to use Javascript Objects. This was done to help organize the code a little. added a function that will escapte html special characters.