Changed data structure, fixes