Optimization and Bug Fixes

Trail: Removed caching of point distance.
Cleaned out some old code.
Reduced size of files significantly.
Added some further chaining.