Improved aligning + markerdetection