Fixed several bugs

The bug where the value of m is changed when it is passed through the
time_loop() function was fixed. It turned out to be due to Python
passing varibles based on order of listing, not by name. I switch the
order of the variables and this caused m to change value with h. I also
renamed m initsize for clairity. A new bug came up in the time_loop()
where the while loop in it never stopped. This was because the if
statement reset the value of dt to zero at the last timestep. As a
temporary fix, the script breaks when that happens now.