Cleanup

Hey, thanks for your awesome implementation. 

I made some changes:
- I added __main__ check to behave like a python module.
- I removed euclidean distance function. It was unused and you're already doing this in 60. and 74. lines.
- I fixed this where condition `0.01, 0.1, length` with `0.01, 0.01, length`. Isn't that right?