Updated local thresholding to correctly handle exluded nodes. Removed import of unnecessary packages at start-up. Moved packages files to the root folder so that is runs on most systems.