Initial maxrects algorithm impl commit.