Added common functions from Lazy.js