move configuration to class constants add connection factory so that we can setup once.