Data bugfixes, and trial1 seems to work (basic version. More TODOs added within trial1