Refactored code and updated with a HTML5 Framework