misc. bugfixes
reorganized files