Extracted spear.js