Adding missing returns statements. Fixing bad property definitions. Splitting general counter increment into two pieces to avoid an xg transaction.