Making some tests with reference counters (WARNING shit stuff)

Signed-off-by: Daniele Ricci <daniele.athome@gmail.com>