add change_index, rename write_f_values to change_f
change to lower case extensions
tidy documentation
make function names consistent