Added index.js, fixed bug in .isFlush