use tile_idx_to_xy instead of duplicating that expression
fix the wait/poll logic again
add more todo items