Added weighting class, and did a bunch of work across the board