added normalize head, fixed JS directories