Re-organise the input arguments, some docs updated