Added functions to WHERE queries

The functions starts_with and contains now work for WHERE queries. Error reporting is not exactly where I want it, but works for now.