Unify parameter naming, fix documentation, update JavaScript compatibility