Add controller logic, change json structure.