Refactor data frame padding handling for more simplicity