Better arguments handling for Javascript