changed structure to context based. This is to include gl graphics based entities.