Updated main file

TODO:
Make it also work as a command line client.