Redo stuff into new functions folder