JSON data added, fixed run problems, initialized loop properly