start testing, and some bugfixes