Move duplicated methods to `BaseFormatter`

Move duplicated methods to `BaseFormatter`