Basic logic for reading in rules