Refactoring for better codeoverview

- Also adds a function which sets the PS-runtime's path
  to the current location of the script

Signed-off-by: XemsDoom <moser.luca@gmail.com>