RANSAC code with tons of errors