Cleanup gridview code to use appropriate Java object