bug fixes and latex report stuff
hm
merged