bugfixes and improved visualization