Broke restcli.py into seperate modules and added the first unittests