Simplified code structure in management command and comments per jrbl's PR comments