clean up and handle constructor errors better