Minor refactor of pad_string