Updating repo to latest build

Cleaned SQL structure and changed files from reverted version to the
most recent build.