Added mask min and debug commands
added support for pw-max flag, fixed a few mask bugs, added better
output for status, and various small fixes
Merge remote-tracking branch 'ninja/master'