Wooo a pull request

Added commandline arguments and some statistics.
Also restructured slightly.