More changes, created data structure. TODO: result processing