updated functions file to fix theme check errors warnings and recomendations