Setting up grid environment