add helpers.js, abstract intervals, use sudo methods