A class project refactored