Extract the NameFormatter class

Signed-off-by: Igor Popov <igor.popov89@gmail.com>