Reduced the complexity in the code a little.
Reduced the complexity in the code a little.

tijmenb/spotlight,keithiopia/spotlight,keithiopia/spotlight,keithiopia/spotlight,alphagov/spotlight,tijmenb/spotlight,alphagov/spotlight,alphagov/spotlight,tijmenb/spotlight