Added help and show commands and rearanged the code