fix magic number bug (10 not n) in modularity_finetune_und
fix various more magic number bugs and standardize all functions to use ci+1, write modularity_finetune functions