improved folder structure by moving functions to server folder
improved folder structure by moving functions out of an outdated file