added xml documentations & some refactorings