Or you could just learn object oriented programming. . .