Added revert & rotate functionality and cleaned up test