fix rotation test and source cleanup