Reorder function parameters declarations to avoid memory overflows (??)