iOS code working, json bugs fixed