Speed improvements in function args parsing and instance creation