lookup service cleanup. this should be written from scratch