moved the spanning tree code into the system library for usage by other applications also