Optimized the PHP code and changed the permissions of the functions file