tests completed + bugfixes.