Started work on moveing each endpoint into it's own file.
This change also simplifies the site index query.
Moved all the of the sql out of the init file and into it's own directory.