Refactor of code responsible for square rotation