Control(): fix function set_name(); some code refactoring