Change to use inner margins instead of paddings, closes #148