Further refactoring from studen questions