global structure, more statements, clenaups, better add/remove functions...

Signed-off-by: Petar Koretic <petar.koretic@sartura.hr>