Improved the Cli and added an interface for the Cli and the Gui
Added license header and fixed some minor stuff