improve code structure in localscoremanager