Added some more code for relations, and added a preliminary relations problem generator.