Separated gy() & gx() from padding.add()

Leads to easier testing and more readable code.