Adding optional prefix_dir and supporting repos.