Bitrate calculator refactoring