used connection pooling for mysql stuff
ensured that all mysql connections are killed before making a new one
seperated routing stuff into the api/tools.js
makes code more modular and easier to read