Tinkering and bugfixes