Cleaned up task further, JSON and legacy text now fully works.