Implement head.js