Finished more of the SQL Scripts and DataLogic functionality

Finished more of the SQL Scripts and DataLogic functionality