Added a parameter 'MaxRecords' to only pull certain number of records
With this, Reverted the change to limit the number of keys passed to the
IN clause in the query to mark the assertions as processed

Also, made few minor corrections to existing code