Cleaned up JSON parsing