Bugfix: Had forgotten to refactor a variable which gave a compile error
- a little more code cleaning