Refactored.
Reduced code duplication in Weighter. Removed performance bottlenecks in weighter.
Renamed some methods for better clarity.
Renamed some classes for consistency.
Added additional documentation.