Added rotation mode and adds whitespace in empty cells.