Refactored spatiotemporal view: code factorization