Semi-working implementation of focus.