Fix broken commit with better parameter passing; cleanup