Began simplifying code

TODO: Add doCommand for a string and add getProperties