Refactor custom.php to custom directory