Make addDataPadding method to avoid clutter.
Simplify and optimize
Merge pull request #668 from antius/master

Make addDataPadding method to avoid clutter.