Removed scoring function precalculation. Implemented scoring_function::score and scoring_function::weight