Added maxitems functionality
Tweaks to maxitems mode
Added proper check for maxitems
Updated some tests and create new alternative mode. Alternative to good.
Added maxitems test for alternate mode
Fixes another bug with maxitems in alternate mode
Merge branch 'maxitems' in master