Small bugfixes and improvements to the calculator script

- Made set up for chain calculations
- Bugfix: will now clear the arrays, this makes it possible to start new
calculations without bugs
- Added code to start new calculations