bugfixes and some progress