Added features to visualization function.