Increased coverage. Minor bugfixes.