Added new linear fitting method and fixed gsm loading and power spectrum fitting