Adding html5mode support