Move data manipulation to dao. Update matt lib and handling.