Refactor space_padding() #55