Several improvements and bug fixes, especially visualization related