Move formatting helpers to Realex::Common module, fix specs