Added userName to reporting ; small refactorings