Add mirror feature, configuration documentation, and fix memory leak