Moved all sql sourcing to server.py for full credit