Padding and offset calculation polish

- Make sure the padding is equal in each side (if set)
- Calculation of the offset with lines diff only if neccesary