Codeacademy refactored