Update variable names to use correct terminology.

Corrected variables that were named atoms incorrectly, most of the
changes are done in the save_rules() function.