Small refactorings & more comments