New code structure using classes