reorganisation
reorganizing code, bugfixes