Some changes for easier use with json