Added capacity to instantiate entities from JSON. Closes #5