Clean up the api SQL a little
Clean up the examples
Move SQL statements to JSON