Added God.prepareJson method and refactored common utilities.