Fix boundary checking.
Fix rendering trajectories.
Add reset view.
Fix refreshing.