Added javascript code to handle alerts in Safari and make it work with all browsers
Moved the dataUtil to seperate util files