Change syntax

Initial stab at building the new search API - probably in need of a lot of re-factoring still

Please point out the non-idiomatic stuff :-)