Moving bundle adjustment to its own class