Reorganisation (separated global variables).
Provided debugging-targets.
Separated weight-handling (small reorganisation).
Improved organisation of time-handling.