minor bugfixes and test app added