Aarons changes

Hi Piers, 
Here are the changes Aaron made to the plugin - I haven't looked at them just put them here for you to see.

I haven't looked at the request for improving the search yet.