Fixed some bugs.
Now it is possible to run the whole program as exported jar.