Fixed a lot of stuff for making things simpler. All calculations are now done in Makefile.relations.