Got the program working. Moving on to handling errors.