I made a few tweaks to support the 328p chip at 16MHz used with current Arduinos. See if you like it.
Modifications for Arduino or ATmega328P.
This is not correct formula for bitrate, see upstream fix for atmega168. And because you duplicate code instead of reusing existing, you don't automatically get fixes like this.
Again, why duplicate code here if it is the same as for atmega168?