Conditional Inference Procedures in a Permutation Test Framework