Added AGPL header + small bugfixes

Signed-off-by: jmbarbier <jm.barbier@solidev.net>