fixed a problem with org.json being loaded from different bundles
code cleanup