cleaned up virtual table code