Parse data + fix leaks