Added discovery stuff (UNTESTED)
Removed old code and such for saving space. Starting to get tight.