"Out of bounds" logic and clean up