added a way to serialize to pickle as well as json
reverted the serialization change
moved the commands into the main.py file