AVALANCHE: More clean up, removement of dead code, some rearranging.