Refactoring GridView