Added settings and command line arguments parsing. Now program can be run in text and gui mode.