Refactor

Common padding extracted, simplified