Rewrite of inview check.
Fix #5