Comments + minor refactoring