It finally works! The code's really confusing, though. We also might need to completely restructure it to use lists instead of strings.