Removed all references to assert_valid_kwargs. This functionality is already provided by Python's default parameters
Merge branch 'upstream' into dev. Tidied up code.