Fix parsing degree for fitting polynomial

Degree was read and passed as string to regression
The first thing it does is degree + 1,
in case degree is “2” this results in “21”, which is then looped over.
Now it (and histogram bins) are properly parsed as int first.
Improve regression code style

Remove unneeded assignments of variables.
Add some brackets for clarity.
Some space here and there..