Refactor modernizr

@aduggin @jonwyatt-mas