Removed deprecated code and implemented more JSON functionality.