Simplified json module and added tests