Refactored specs and documentation.
Sort parameters after merging them.