Refactored gridview and graphs