bug fixes related to visualization; clean up