Added Source::rate method instead. Tests and formatting.