Added argument-handling for commandline-functionality.