Adding constructor to allow object to be rebuilt from JSON