Extract parts of directional-property into separate functions and add better directional collapsing