removed public and some minor bugfixes