Added validation checks to the program class