Decreased file open calls by classing functions