Remove require_once from inside functions