move functions out of includes/functions
fix locale dir
move more functions