Reorganize and add HTML5 APIS