removing unused parts of foresight.js