primitive one-pass maximizer, demo aligner, add debugbox option, fix block size calculation