commenting and first minor refactorings
commenting stuff