Fixed rotary class sending an array instead of integer.

Fixed bug and changed class names to better describe their
functionality.
Optimizations