Comments and small refactor