Bugfixes and new tool