Fix for #15.

Along with simplifed padding obtainment logic.