Added logic to save and load-commands. Load command still has some errors..