Ataki/gridfs

@stvstnfrd to review commit
Makes sense, and would make the code more readable.