Updated commandline tool, so code is fully functional and can be tested