SLAM isn't a simple plug 'n play type of algorithm. Least squares alone takes some good knowledge of math and trig. But, I have managed to extract landmarks out of my scans using least squares and ransac. I've been using SLAM for Dummies written by a few MIT students. This code was written in C# but leaves much to desire. My scans come in wirelessly as two doubles: Angle and Distance. It is first converted to X,Y coordinates and data bound to a WPF object for display. This MIT document doesn't do this. Instead, it using a sweep of distance measurements and assumes the angle. This assumption is based on their LIDAR returning X degrees a second. This caused me a good deal of confusion when I first dug into the code. It turns out, simply reading their explanation of SLAM is way more forthcoming.
I am able to manually pick any data point along the 360 degree scan and find a matching landmark using Least Squares and ransac. This was a great step forward as it taught me what Least Squares truly does. I was also able to use some built in WPF trig functionality to determine how many scanned points lie inside a rectangle built from the Least Squares. This is how I know if the scan points are a long straight line/wall that can be easily used in the Extended Kalman Filter. (mind you, all of this work is harder when using two different scanners pulling points 180 degrees from one another)
I'll put some C# code here this weekend to better explain all of this.
I also still owe you all example C# code for reading the LIDAR-Lite's. It will be branched off LIDAR-Lite's github this weekend also.