Consensus and Profile problem solved

Reuse GC code in lib.fs
use lib.fs and remove unnecessary code