Fixed paramater handling and improved documentation