add ability to create table with index, cleanup