cut down elims.js code, prepare for bracket integration