First commit of fitting and analysis codes.