added file functions for all classes and changed some variable names