controller code refactoring and comment toggle
merge