Added documentation as well as adjusted parameter names to be more consistent