moved json calls to /api
added some padding