Refactored programming exercises framework