Implement directional auto-scanning. Fixes #48