Allow base package to be set and update json generation to remove JSONException usages