Comments updated, refactorings