Some super basic and dirty functionality.
Changing contructor to accept a json object.
Move reusable pieces into lib