Added DoubleBuffer class, implemented it, cleaning network handler