Remove format_number() helper due to its excessive queries

Fixes #277