Shortened code in readit.js