New rotation method, some bug fixes.