Cleaned up code, now indexing custom fields