Functions file fixed. FINALLY