Moved everything out of the.ipp file and into the header file for debuggin purposes.
Simplified the getNearest method.