join analysis_init() and analysis_init_sparse()

cleanup