Refactored some code, also added function that checks whether a new point being added is within a certain radius of another point