Fix defer bug in bindata, set correct json headers for the healthcheck, remove unecessary recursion