Refactored methods which dealed directly with gridfile contents instead ...

...of using gridfile object. This refactoring is needed in order to later refactore pre and post processing of chunks logic to optimize buffer allocation and prepare the ground for effective usage of pre and post processing for encryption, which requires keeping a context between calls