Addes set command and using ast instead of creating dictionaries