Would be good to perhaps unify the if/else a bit more by setting the e.g. bottomRight/topRight/topLeft/bottomLeft before and using the same block.