Improved parsing and proxy creation to handle parameter types correctly