This maxItems value didn't seem to change, so moving it outside of the functions means they can all access it.