Codechanges and optimations inside modify.php and scrips/functions.php