Changed to json system. Added new features.