Smart Rotate Pull Request

Resending pull request. Addresses #236